package com.baitiaojun.video;

import com.baitiaojun.api.util.SpringContextUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableScheduling
@EnableAsync
@EnableTransactionManagement
@EnableFeignClients
@MapperScan(basePackages = "com.baitiaojun.video.mapper")
@EnableDiscoveryClient
@SpringBootApplication
public class ImoocBilibiliVideoApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(ImoocBilibiliVideoApplication.class, args);
        SpringContextUtil.setApplicationContext(context);
    }

}
